home *** CD-ROM | disk | FTP | other *** search
/ Day Cry / Day Cry CD.bin / oh_towns / taropyon / splib / splib.lzh / PRG / ZMODEM / RZ.H < prev    next >
C/C++ Source or Header  |  1993-08-10  |  2KB  |  80 lines

  1. #ifndef    _RZ_H
  2. #define    _RZ_H
  3.  
  4. #ifndef    OK
  5. #    define OK 0
  6. #endif
  7. #ifndef    FALSE
  8. #    define FALSE 0
  9. #endif
  10. #ifndef    TRUE
  11. #    define TRUE 1
  12. #endif
  13. #ifndef    ERROR
  14. #    define ERROR (-1)
  15. #endif
  16.  
  17. /*
  18.  * Max value for HOWMANY is 255. A larger value reduces system overhead but
  19.  * may evoke kernel bugs. 133 corresponds to an XMODEM/CRC sector
  20.  */
  21. #ifndef HOWMANY
  22. #    define HOWMANY 133
  23. #endif
  24.  
  25. /* Ward Christensen / CP/M parameters - Don't change these! */
  26. #define ENQ 005
  27. #define CAN ('X'&037)
  28. #define XOFF ('s'&037)
  29. #define XON ('q'&037)
  30. #define SOH 1
  31. #define STX 2
  32. #define EOT 4
  33. #define ACK 6
  34. #define NAK 025
  35. #define CPMEOF 032
  36. #define WANTCRC 0103            /* send C not NAK to get crc not checksum */
  37. #define TIMEOUT (-2)
  38. #define RCDO (-3)
  39. #define GCOUNT (-4)
  40. #define ERRORMAX 5
  41. #define RETRYMAX 5
  42. #define WCEOT (-10)
  43. #define PATHLEN 257             /* ready for 4.2 bsd ? */
  44. #define UNIXFILE 0xF000         /* The S_IFMT file mask bit for stat */
  45.  
  46. static    long    getfree(void);
  47. static    void    usage(void);
  48. static    void    vfile( CONST char *form, ... );
  49. static    int        wcreceive(int argc, char **argp);
  50. static    int        wcrxpn(char *rpn);
  51. static    int        wcrx(void);
  52. static    int        wcgetsec(char *rxbuf, int maxtime);
  53. static    int        readline(int timeout);
  54. static    void    purgeline(void);
  55. static    int        procheader(char *name);
  56. static    void    openit(char *name, char *openmode);
  57. static    int        make_dirs(register char *pathname);
  58. static    int        putsec(char *buf, register n);
  59. static    void    sendline(int c);
  60. static    void    flushmo(void);
  61. static    void    flushmoc(void);
  62. static    char       *substr(register char *s, register char *t);
  63. static    void    zperr(char *form, ... );
  64. static    void    canit(void);
  65. static    void    report(int sct);
  66. static    void    chkinvok(char *s);
  67. static    void    checkpath(char *name);
  68. static    int        tryz(void);
  69. static    int        rzfiles(void);
  70. static    int        rzfile(void);
  71. static    void    zmputs(char *s);
  72. static    int        closeit(void);
  73. static    void    ackbibi(void);
  74. static    void    bttyout(int c);
  75. static    int        sys2(register char *s);
  76. static    void    exec2(register char *s);
  77.  
  78.  
  79. #endif
  80.